package com.banmao.snake_client.indexScene.controller;

import com.banmao.snake_client.loginScene.view.LoginView;
import com.banmao.snake_core.util.FXMLUtil;
import javafx.event.ActionEvent;
import javafx.scene.control.Tab;
import javafx.scene.control.TabPane;
import lombok.Data;
import org.springframework.stereotype.Controller;

@Data
@Controller
public class IndexController {


    public TabPane super_tabPane;

    // 打开登陆界面
    public void openLoginScene(ActionEvent actionEvent) {
        try {
            Tab tab = FXMLUtil.loadFxmlToTabPane(super_tabPane, LoginView.class);

            super_tabPane.getSelectionModel().select(tab);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }

    }


}
